/*
 * File Name：Constants.java
 * Copyright：Copyright 2008-2014 CiWong.Inc. All Rights Reserved.
 * Description： Constants.java
 * Modify By：RES-KUNZHU
 * Modify Date：2014-5-27
 * Modify Type：Add
 */
package com.ciwong.mobilelib.utils;

import com.ciwong.mobilelib.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.assist.ImageSize;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;

/**
 * 常量类
 *
 * @author RES-KUNZHU
 * @version ciwong v.1.0 2014-5-27
 * @since ciwong v.1.0
 */
public class BaseConstants {

    /**
     * 弹窗框提示信息文字大小
     */
    public static final int DIALOG_MESSAGE_TEXTSIZE = 16;

    /**
     * 录音采样率
     */
    public static final int SAMPLERATE = 16000;

    /**
     * 文件前缀
     */
    public static final String FILE_PREFIX = "file://";

    /**
     * 照相缩放图片最大高度
     */
    public static final int MATRIX_IMG_MAX_HEIGHT = 500;

    /**
     * 当前登录的用户ID
     */
    public static final String SHARE_PRE_CURR_LOGIN_USER = "SHARE_PRE_CURR_LOGIN_USER";

    /**
     * 当前用户绑定的手机号
     */
    public static final String SHARE_PRE_CURR_LOGIN_USER_PHONE = "SHARE_PRE_CURR_LOGIN_USER_PHONE";

    /**
     * 当然用户绑定手机号信息
     */
    public static final String SHARE_PRE_CURR_BIND_PHONE_INFO = "SHARE_PRE_CURR_BIND_PHONE_INFO";
    /**
     * 当前登陆用户信息
     */
    public static final String SHARE_KEY_USER_INFO_BASE = "SHARE_KEY_USER_INFO_BASE";

    /**
     * 当前登陆用户学校信息
     */
    public static final String SHARE_KEY_USER_SCHOOL_BASE = "SHARE_KEY_USER_SCHOOL_BASE";

    /**
     * 首次登录信息
     */
    public static final String SHARE_KEY_IS_FIRST_LOGIN = "SHARE_KEY_IS_FIRST_LOGIN";

    /**
     * 首次showTip
     */
    public static final String SHARE_KEY_IS_FIRST_SHOW_TIP = "SHARE_KEY_IS_FIRST_SHOW_TIP";

    /**
     * 首次showAddTip
     */
    public static final String SHARE_KEY_IS_FIRST_SHOW_ADD_TIP = "SHARE_KEY_IS_FIRST_SHOW_ADD_TIP";

    /**
     * 适配器头像的图片大小
     */
    public static final ImageSize AVATAR_IMA_SIZE = new ImageSize(60, 60);


    /**
     * 发送
     */
    public static final int SEND = 1;

    /**
     * 涂鸦
     */
    public static final int GRAFF = 2;

    /**
     * p1p
     */
    public static final int PAT_PAT = 3;

    /**
     * 网络请求验证信息
     */
    public static final String SHARE_KEY_VERITIFY_INFO = "SHARE_KEY_VERITIFY_INFO";

    /**
     * 应用上一次退出的位置
     */
    public static final String SHARE_KEY_LAST_EXIT_POSITION = "SHARE_KEY_LAST_EXIT_POSITION";

    /**
     * 应用上一次退出时间点
     */
    public static final String SHARE_KEY_LAST_EXIT_TIME = "SHARE_KEY_LAST_EXIT_TIME";



    public static DisplayImageOptions.Builder getDisplayBuilder() {
        return new DisplayImageOptions.Builder().cacheInMemory(true)
                .cacheOnDisc(true)
                .showImageForEmptyUri(R.mipmap.lib_default_rect_failed)
                .showImageOnFail(R.mipmap.lib_default_rect_failed);
    }

    public static DisplayImageOptions getLoginCircleBuilder() {
        return getDisplayBuilder()
                .showImageForEmptyUri(R.mipmap.lib_default_rect_failed)
                .showImageOnFail(R.mipmap.lib_default_rect_failed)
                .cacheInMemory(true).cacheOnDisk(true)
                .displayer(new RoundedBitmapDisplayer(100)).build();
    }
}
